#include "add_dialog.h"
#include "ui_add_dialog.h"

Add_dialog::Add_dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Add_dialog)
{
    ui->setupUi(this);
}

Add_dialog::~Add_dialog()
{
    delete ui;
}

void Add_dialog::on_pushButton_no_clicked()
{
    close();
}

void Add_dialog::on_pushButton_yes_clicked()
{
    QString words = ui->lineEdit_word->text();
    QString pronunciation = ui->lineEdit_pronunciation->text();
    QString meaning = ui->lineEdit_meaning->text();

    emit(sendAddInput(words,pronunciation,meaning));
    close();
}
